package sivin.uikit.adapter;

import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.viewbinding.ViewBinding;

public interface ItemViewDelegate2<T, Binding extends ViewBinding> {

    Binding getViewBinding(ViewGroup parent);

    boolean isForViewType(T item, int position);

    void convert(@NonNull ViewHolder<Binding> holder, @NonNull T t, int position);

    default void onViewRecycled(ViewHolder<Binding> holder, T t, int position) {
    }

    default void onViewAttachedToWindow(ViewHolder<Binding> holder, T t, int position) {
    }

    default void onViewDetachedFromWindow(ViewHolder<Binding> holder, T t, int position) {
    }
}
